<template>
  <a-collapse expand-icon-position="right" :show-expand-icon="true">
    <FileCollapseItem
      v-for="file in files"
      :key="`file-${(file as fileObj).id}`"
      :file="(file as fileObj)"
    ></FileCollapseItem>
  </a-collapse>
</template>

<script lang="ts" setup>
  import { defineProps, ref } from 'vue';
  import FileCollapseItem from './file-collapse-item.vue';

  interface fileObj {
    id?: string | number;
  }
  const props = defineProps({
    files: {
      type: Array,
      default() {
        const fileList: fileObj[] = [];
        return fileList;
      },
    },
  });
</script>

<style scoped></style>
